package org.systm.menu.entity;

import lombok.*;
import lombok.experimental.SuperBuilder;
import org.global.GEntity;
import org.global.basic.JpaArrayPersistence;
import org.systm.adminuser.entity.UserPermission;
import javax.persistence.*;
import java.util.List;

/**
 * 前端页面的数据
 */
@Getter
@Setter
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@Entity(name = "sys_page_meta")
public class PageMeta  extends GEntity<String> {
    @Column(columnDefinition = "varchar(50) comment '页面标题'")
    private String title;

    @Column(columnDefinition = "varchar(50) comment '页面图标'")
    private String svgIcon;

    @Convert(converter = JpaArrayPersistence.ListPersistence.class)
    @Column(columnDefinition = "varchar(255) comment '页面拥有的权限'")
    private List<String> roles;

    @Column(columnDefinition = "tinyint default 1 comment '是否隐藏'")
    private boolean hidden;

    @Column(columnDefinition = "tinyint default 1 comment '始终显示根菜单'")
    private boolean alwaysShow;

    @Column(columnDefinition = "tinyint default 0 comment ''")
    private boolean affix;
}
